package com.base.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.base.mapper.voipmapper.SelfShopGoodsMapper;
import com.base.po.voip.SelfShopGoods;
import com.base.po.voip.SelfShopGoodsExample;
import com.base.service.SelfShopGoodsService;
import com.base.utils.Page;

@Service("selfShopGoodsService")
public class SelfShopGoodsServiceImpl implements SelfShopGoodsService {

    @Autowired
    private SelfShopGoodsMapper selfShopGoodsMapper;

    @Override
    public int countByExample(SelfShopGoodsExample example) {

        return selfShopGoodsMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(SelfShopGoodsExample example) {

        return selfShopGoodsMapper.deleteByExample(example);
    }

    @Override
    public int insert(SelfShopGoods record) {

        return selfShopGoodsMapper.insert(record);
    }

    @Override
    public int insertSelective(SelfShopGoods record) {

        return selfShopGoodsMapper.insertSelective(record);
    }

    @Override
    public List<SelfShopGoods> selectByExample(SelfShopGoodsExample example) {

        return selfShopGoodsMapper.selectByExample(example);
    }

    @Override
    public SelfShopGoods selectByPrimaryKey(String id) {
        if (id == null || id.isEmpty()) {
            return null;
        }
        return selfShopGoodsMapper.selectByPrimaryKey(id);
    }

    @Override
    public SelfShopGoods selectById(String id) {
        return selfShopGoodsMapper.selectById(id);
    }

    @Override
    public List<SelfShopGoods> selectAll() {
        return selfShopGoodsMapper.selectAll();
    }

    @Override
    public int updateByExampleSelective(SelfShopGoods record, SelfShopGoodsExample example) {

        return selfShopGoodsMapper.updateByExampleSelective(record, example);
    }

    @Override
    public int updateByExample(SelfShopGoods record, SelfShopGoodsExample example) {

        return selfShopGoodsMapper.updateByExample(record, example);
    }

    @Override
    public int updateByPrimaryKeySelective(SelfShopGoods record) {

        return selfShopGoodsMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<SelfShopGoods> selectByAll(Page page, String parentid, String shopid, String goodstext,
                                           String firstclassify, String secondclassify, Byte status) {

        return selfShopGoodsMapper.selectByAll(page, parentid, shopid, goodstext, firstclassify, secondclassify, status);
    }

    @Override
    public int countByAll(String parentid, String shopid, String goodstext, String firstclassify, String secondclassify,
                          Byte status) {

        return selfShopGoodsMapper.countByAll(parentid, shopid, goodstext, firstclassify, secondclassify, status);
    }

    @Override
    public List<SelfShopGoods> selectByParentID(Page page, String parentid, String shopid, String goodstext,
                                                String firstclassify, String secondclassify, String sname, String sord) {

        return selfShopGoodsMapper.selectByParentID(page, parentid, shopid, goodstext, firstclassify, secondclassify, sname, sord);
    }

    @Override
    public List<SelfShopGoods> selectNew(String parentid, String shopid) {
        return selfShopGoodsMapper.selectNew(parentid, shopid);
    }

    @Override
    public int countByParentID(String parentid, String shopid, String goodstext, String firstclassify, String secondclassify) {

        return selfShopGoodsMapper.countByParentID(parentid, shopid, goodstext, firstclassify, secondclassify);
    }

    @Override
    public SelfShopGoods selectsomeById(String goodsid) {
        return selfShopGoodsMapper.selectsomeById(goodsid);
    }

    @Override
    public SelfShopGoods selectByIdexceptContext(String id) {
        return selfShopGoodsMapper.selectByIdexceptContext(id);
    }

    @Override
    public List<SelfShopGoods> selectAllStock() {
        return selfShopGoodsMapper.selectAllStock();
    }

    @Override
    public int countByID(String goodsid) {
        return selfShopGoodsMapper.countByID(goodsid);
    }

    @Override
    public int updateByPrimaryKey(SelfShopGoods record) {

        return selfShopGoodsMapper.updateByPrimaryKey(record);
    }
}
